package ast

import (
	"fmt"
	"os"
	"test/token"
)

func TestString() {
	program := &Program{
		Statements: []Statement{
			&LetStatement{
				Token: token.Token{Type: token.LET, Literal: "let"},
				Name: &Identifier{
					Token: token.Token{Type: token.IDENTIFIER, Literal: "myVar"},
					Value: "myVar",
				},
				Value: &Identifier{
					Token: token.Token{Type: token.IDENTIFIER, Literal: "annotherVar"},
					Value: "annotherVar",
				},
			},
		},
	}

	fmt.Fprintf(os.Stdout, program.String())
}
